"""NLP_BE URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/4.0/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path
from apps.Nlp_Be1 import views

from django.conf import settings
from django.conf.urls.static import static

urlpatterns = [
    path('admin/', admin.site.urls),
    path('search_text/', views.search_text),  # 用户输入数据的处理
    path('get_history/', views.get_history),
    path('search_text_1/', views.search_text_1),
    path('get_sentences/', views.get_sentences),
    path('upload/', views.upload),
    path('delete_search/', views.delete_search),
    path('delete_searches/', views.delete_searches),
    path('Edit_Ner/', views.Edit_Ner),
    path('Edit_Re/', views.Edit_Re),
    path('get_score/', views.get_score),
    path('count_score/', views.count_score),
    path('check_username/', views.check_username),
    path('check_password/', views.check_password),
    path('query_text/', views.query_text),
    path('export_search_excel/', views.export_search_excel)
]
#添加这行--- 允许所有的media文件被访问
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
